package com.io.example.demoparent.responsibility;

public class CollegeApprover extends Approver {

    public CollegeApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest request) {
        if (5000 >request.getPrice( ) && request.getPrice( ) > 10000) {
            System.out.println("请求编号 =" + request.getId( ) + " 被 " + this.name + " 处理");
        } else{
            approver.processRequest(request);
        }
    }
}
